-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plate cache updates and DB serialization clean up. #5162
Conversation
@@ -205,7 +205,7 @@ private static Plate getPlate(ExpProtocol protocol) | |||
{ | |||
// resolve plate by the legacy deprecated plate name method | |||
ObjectProperty prop = protocol.getObjectProperties().get(protocol.getLSID() + AbstractPlateBasedAssayProvider.PLATE_TEMPLATE_SUFFIX); | |||
return prop != null ? PlateManager.get().getPlate(protocol.getContainer(), prop.getStringValue()) : null; | |||
return prop != null ? PlateManager.get().getPlateByName(protocol.getContainer(), prop.getStringValue()) : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, did you verify these changes through the upgrade(s)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I ran the upgrade manually, but you have to revert the protocol property to use the plate name unless you upgrade from an older version. Did you see an error on your end?
/** | ||
* Serializes a row in the assay.plate table. | ||
*/ | ||
public class PlateBean extends Entity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Splitting these up will serve us well I believe and leave us less prone to improper serialization on either side.
Rationale
Removes support for plate name in the cache. Plate by name is
deprecated
and could eventually be removed. Instead the more recentplateId
has been added to the cache.This PR also introduces a
PlateBean
to help with serialization to and from the database. This allows us to be a bit cleaner with thePlate
instance which is a richer, composed object so we don't have to have methods like:getPlateType
&getPlateTypeObject
getPlateSet
&getPlateSetObject
Which were needed to support DB binding plus returning the underlying object instances.